<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>01-vue使用步骤</title>
</head>
<body>
    <div id="app">
        账号 <input type="text" v-model="username"></br></br>
        密码 <input type="text" v-model="password"></br>
        <button @click="submit">登陆</button>
        <button @click="reset">重置</button>
    </div>

    <!--导入vue.js-->
    <script src="js/vue.js"></script>

    <script>
        /*创建vue实例对象*/
        let app = new Vue({
            /*数据挂载的节点*/
            el: '#app',
            data:{
                username:'',
                password:''
            },
            methods: {
                submit(){
                    console.log('用户名和密码:'+this.username+':'+this.password);
                },
                reset(){
                    this.username=''
                    this.password=''
                }
            }
        })

    </script>

</body>
</html>